-- GENERATED SPELL FOR [Marshfang Ripper] --


function spell0_18130(pUnit, Event) --@Arcane Explosion,Self--
pUnit:FullCastSpellOnTarget(33860,pUnit)
pUnit:RegisterEvent('Sorts_18130', 1500, 1)
end

function spell1_18130(pUnit, Event) --@Drain Mana,Drain--
pUnit:FullCastSpellOnTarget(17008,pUnit:GetRandomPlayer(4))
pUnit:RegisterEvent('Sorts_18130', 5000, 1)
end

function spell2_18130(pUnit, Event) --@Tendon Rip,n/a--
pUnit:FullCastSpellOnTarget(3604,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_18130', 8000, 1)
end

function Sorts_18130(pUnit, Event)
local choix_sorts_18130 = math.random(0, 2)
if choix_sorts_18130 == 0 then
pUnit:RegisterEvent('spell0_18130', 1, 1)
end
if choix_sorts_18130 == 1 then
pUnit:RegisterEvent('spell1_18130', 1, 1)
end
if choix_sorts_18130 == 2 then
pUnit:RegisterEvent('spell2_18130', 1, 1)
end
end

function mob18130_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_18130', math.random(1500, 3000), 1)
end

function mob18130_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob18130_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob18130_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(18130, 1, 'mob18130_Action')
RegisterUnitEvent(18130, 2, 'mob18130_Leave')
RegisterUnitEvent(18130, 3, 'mob18130_Kill')
RegisterUnitEvent(18130, 4, 'mob18130_Die')
